package cn.wolfcode.service;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.qo.PageResult;
import cn.wolfcode.qo.EmployeeQueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface IEmployeeService {
    void deleteById(Long id);

    void insert(Employee employee, Long[] ids);

    Employee selectById(Long id);

    List<Employee> selectAll();

    void updateById(Employee employee, Long[] ids);

    /**
     * 满足条件的结果集
     *
     * @param qo
     * @return 返回结果集
     */
    PageInfo<Employee> query(EmployeeQueryObject qo);

    Employee login(String username, String password);

    void setNewPassword(Long id, String newPassword);

    void batchDelete(Long[] ids);

    void deleteBatchRelation(Long[] ids);

    Employee checkName(String name);

    //  导出
    Workbook exportXls();

    //  导入
    void importXls(Workbook workbook);

    //  禁用或恢复
    void updateByStatus(Long id, boolean status);

    List<Employee> selectByRoleSn(String... sns);
}
